package com.example.demo.config;

import com.example.demo.entity.BookEntity;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
@PropertySource(value = {"classpath:config/myConfig.properties"})
@ConfigurationProperties(prefix = "userconfigtofile")
public class UserConfigToFile {

    private String name;

    private int age;

    private Date birthday;

    private Map<String, Object> maps;

    private List<Object> lists;

    private BookEntity bookentity;

    @Override
    public String toString() {
        return "UserConfigToFile{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", birthday=" + birthday +
                ", maps=" + maps +
                ", lists=" + lists +
                ", bookEntity=" + bookentity +
                '}';
    }

    public Map<String, Object> getMaps() {
        return maps;
    }

    public void setMaps(Map<String, Object> maps) {
        this.maps = maps;
    }

    public List<Object> getLists() {
        return lists;
    }

    public void setLists(List<Object> lists) {
        this.lists = lists;
    }

    public BookEntity getBookEntity() {
        return bookentity;
    }

    public void setBookEntity(BookEntity bookEntity) {
        this.bookentity = bookEntity;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
